<#include "/includes/son.ftl">

<div class="container-fluid" style="margin-top: 15px;">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <table class="table table-hover">
                        <thead>
            <tr>
                <th>#</th>
                <th>菜单名称</th>
                <th>链接地址</th>
                <th>样式</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
                <#list menuPage.records as ip>
            <tr>
                <td>${ip.id}</td>
                <td>${ip.menuName}</td>
                <td>${ip.menuHref}</td>
                <td>${ip.menuClass}</td>
                    <td>
                        <div class="btn-group">
                            <a id="${ip.id}" class="btn btn-xs btn-default editBtn" href="#!" title=""
                               data-toggle="tooltip" data-original-title="编辑"><i
                                        class="mdi mdi-pencil"></i></a>
                        </div>
                    </td>
            </tr>
            </#list>
            </tbody>
    </table>
                    <ul id="pagination1" class="pagination"></ul>
           </div>
         </div>
      </div>
   </div>
</div>

<script>
    var pageTotal='<#if menuPage.total??>${menuPage.total}</#if>'==''?1:${menuPage.total};
    var pageSize='<#if menuPage.size??>${menuPage.size}</#if>'==''?5:${menuPage.size};
    var currentPage='<#if menuPage.current??>${menuPage.current}</#if>'==''?1:${menuPage.current};
    showPage(pageTotal,pageSize,currentPage);
</script>
<script>
    $(function (){

        $(".editBtn").click(function (){

            window.location.href = '/sys/sysMenu/menuEdit?id=' + $(this).attr('id');

        })




    })


</script>
